package 力扣._7021_判断通过操作能否让字符串相等1;

public class Solution {
    public boolean canBeEqual(String s1, String s2) {
        if((s1.charAt(0)!=s2.charAt(0)||s1.charAt(2)!=s2.charAt(2))
        &&(s1.charAt(0)!=s2.charAt(2)||s1.charAt(2)!=s2.charAt(0))
        )
            return false;
        if((s1.charAt(1)!=s2.charAt(1)||s1.charAt(3)!=s2.charAt(3))
        &&(s1.charAt(1)!=s2.charAt(3)||s1.charAt(3)!=s2.charAt(1))
        )
            return false;
        return true;
    }

    public static void main(String[] args) {
        boolean b = new Solution().canBeEqual("bnxw", "bwxn");
        System.out.println(b);
    }
}
